﻿@using System.Data

@model Tuple<IEnumerable<QcRiverFlows.Models.Region>, IEnumerable<QcRiverFlows.Models.Flow>>

@{
    ViewBag.Title = "River Flows";
}

<div class="content-primary">
       
        @foreach (var region in Model.Item1)
        {
            <div data-role="collapsible" data-theme="b" data-collapsed="false">
                <h3>@Html.DisplayFor(modelItem => region.Name)</h3>

                <ul data-role="listview" data-theme="c" data-inset="true">
                    @foreach (var flow in Model.Item2.Where(x => x.RegionId == region.Id))
                        {
                            <li>
                                <a href="">

                                <table style="white-space: nowrap; width:100%">
                                    <tr>
                                        <td style="background-color:Green; width: 2px"></td>

                                        <td style="padding-left: 5px">
                                            <h3>@Html.DisplayFor(modelItem => flow.River.Name)</h3>
                                                <p><strong>@Html.DisplayFor(modelItem => flow.Name)</strong></p>
                                                <p>@Html.DisplayFor(modelItem => flow.Category.Name)</p>
                                        </td>

                                        <td style="text-align:right">
                                            <p><br />
                                                    <br /><strong>@Html.DisplayFor(modelItem => flow.Class)</strong><br />14.6 m³/sec</p>
                                        </td>
                                
                                    </tr>
                                </table>
                                                                   
                                </a>
                                <a href="" data-icon="info" data-theme="d"></a>
                            </li>
                        }
                    </ul>
           </div> 
        }


      

</div>












  @*  
  
  résultat potable...

  
  @foreach (var region in Model.Item1)
    {
        <div data-role="collapsible" data-theme="b" data-collapsed="false">
            <h3>@Html.DisplayFor(modelItem => region.Name)</h3>
            <br />
            <ul data-role="listview" data-theme="c" data-divider-theme="c" data-inset="true"
                data-filter="true">
                @foreach (var flow in Model.Item2.Where(x => x.RegionId == region.Id))
                {
                    <li><a href="">
                        <h3><img src="Content/Images/unknown.png" />
                            @Html.DisplayFor(modelItem => flow.River.Name)</h3>
                        <p><strong>@Html.DisplayFor(modelItem => flow.Name)</strong></p>
                        <p>@Html.DisplayFor(modelItem => flow.Category.Name)</p>
                        <p class="ui-li-aside">
                                                
                            <br /><strong>@Html.DisplayFor(modelItem => flow.Class)</strong><br />14.6 m³/sec</p></a>
                        
                            <a href="" data-icon="info" data-theme="d"></a></li>
                }
            </ul>
        </div>
    }*@

